<template>
	<view class="lgmain animated fadeIn faster">
		<view class="px-5 d-flex d-flex-middle" :style="{'paddingTop':$store.state.statusBarHeight+'px','height': $store.state.titleBarHeight + 'px'}" @click="goBack">
			<text class="icon-31fanhui1 iconfont"></text>
		</view>
		<view style="padding-top: 200rpx;">
			<view class="d-flex d-flex-column d-flex-center d-flex-middle">
				<image class="mb-5" src="/static/images/logo.png" style="width: 190rpx;height: 190rpx;"></image>
				<image class="mb-15" src="https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/goxiaoda.png" mode="widthFix" style="width: 222rpx;"></image>
				<view class="px-6 d-flex-center">
					<button class="wxbutton d-flex d-flex-middle d-flex-center" @click="fastLogin">一键登录</button>
					<view class="d-flex d-flex-top" style="margin-top: 20rpx;margin-bottom: 220rpx;">
						<checkbox :checked="isChecked" style="transform:scale(0.6)" @click="isChecked = !isChecked"></checkbox>
						<view>
							<text class="font24 color999" @click="isChecked = !isChecked">我已同意</text>
							<text class="font24 colorlan">《用户协议》</text>
							<text class="font24 color999">和</text>
							<text class="font24 colorlan">《隐私条款》</text><text class="font24 color999">并授权悦小嗒获得本机号码</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="position-absolute left-0 right-0" style="bottom: 80rpx;">
			<view class="d-flex d-flex-center">
				<view class="d-flex d-flex-column d-flex-center d-flex-middle mr-4">
					<image src="https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/bootwx.png" style="width: 70rpx;height: 70rpx;"></image>
					<text class="mt-1 font26" style="color: #5a5655;">微信登录</text>
				</view>
				<view class="d-flex d-flex-column d-flex-center d-flex-middle mr-4">
					<image src="https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/bootqq.png" style="width: 70rpx;height: 70rpx;"></image>
					<text class="mt-1 font26" style="color: #5a5655;">QQ登录</text>
				</view>
				<view class="d-flex d-flex-column d-flex-center d-flex-middle" @click="alogin">
					<image src="https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/bootaccount.png" style="width: 70rpx;height: 70rpx;"></image>
					<text class="mt-1 font26" style="color: #5a5655;">已有账号</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import store from '@/store/index.js';
	import { manner } from "@/util/manner.js";
	export default {
		data() {
			return {
				isChecked:false
			}
		},
		methods: {
			fastLogin(){
				uni.login({
					provider:'univerify',
					univerifyStyle:{
						fullScreen:false,
						"backgroundImage": "https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/bootbg.png",
						"icon": {
						    "path": "static/images/logo.png",
						    "width":  "60px",
						    "height": "60px"
						},
						// "closeIcon": {
						//     "path": "static/images/31fanhui1.png",
						//     "width":  "60px",
						//     "height": "60px"
						// },
						"phoneNum": {
						    "color": "#202020"
						},
						"slogan": {
						    "color": "#BBBBBB"  //  slogan 字体颜色 默认值：#BBBBBB
						},
						"authButton": {
						    "normalColor": "#70dec1",
						    "highlightColor": "#03dda4",
						    "disabledColor": "#dce0df",
						    "textColor": "#ffffff",
						    "title": "本机号码一键登录",
						    "borderRadius": "24px"
						},
						"otherLoginButton": {
							"visible": false
						},
						"privacyTerms": {
						    "defaultCheckBoxState":true,
						    "isCenterHint":false,
						    "checkBoxSize":12,
							"checkedImage":"static/images/checkbox-checked.png",
							"uncheckedImage":"static/images/checkbox.png",
						    "textColor": "#BBBBBB",
						    "termsColor": "#43abe5",
						    "prefix": "我已阅读并同意",
						    "suffix": "并使用本机号码登录"
						},
					},
					success:res=>{
						console.log('res',res)
						setTimeout(()=>{
							uni.closeAuthView()
						},1000)
					},fail(err) {
						console.log('err',err)
					}
				})
			},
			alogin(){
				uni.navigateTo({
					url:'/pagesMain/mplogin/mplogin'
				})
			},
			goBack(){
				manner.goBack()
			}
		}
	}
</script>

<style scoped>
.lgmain{
	background-image: url('https://168809.oss-cn-hangzhou.aliyuncs.com/community/temp/bootbg.png');
	background-repeat: no-repeat;
	background-size: cover;
	background-position: 0 100%;
	min-height: 100vh;
	position: relative;
}
</style>
